Skip to content

Install CLI tools with mise and desktop apps with Homebrew and winget, replace the no-encryption branch with a prompt, and add CI - #7

Merged
patrick-5546 merged 76 commits into
mainfrom
infra-improvements
Nov 13, 2026
Merged

patrick-5546 merged 76 commits into
mainfrom
infra-improvements

Conversation

@patrick-5546

@patrick-5546 patrick-5546 commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Infrastructure improvements from the dotfiles review, updated for the review comments. Each commit stands alone, and its message explains the details.

Changes

  • mise replaces grm (74a403d, 1c32499, 22bfdea):
    • Every OS installs the same tools from ~/.config/mise/config.toml. It's a plain file, so changes made with mise use -g can be saved with chezmoi re-add ~/.config/mise.
    • mise.lock pins each tool's version, URL and checksum for Linux (x64 and arm64), Apple silicon Macs and Windows. The install scripts run mise install --locked and rerun only when the config or the lock changes. Before, they reinstalled everything and called the GitHub API about 15 times on every apply.
    • To upgrade, run mise upgrade and chezmoi re-add ~/.config/mise, then commit. To roll back, revert the commit.
    • mise skips tool and mise releases from the last 7 days, instead of its default 24 hours, and updates itself once a week (5d13c5d). Neither changes the versions in mise.lock. The tools scripts give mise's installers the same age when they first install mise, on Windows too (9bf4a71).
    • Completions are written with > instead of >>, and delta's completion now works.
  • node and go from mise (2dfb843): replaces zsh-nvm. Node 26 needs libatomic, so the packages script installs it when missing.
  • Windows uses mise too (beabb00): the tools script installs mise in ~\.local\bin, then the shared tools except tmux. The profile activates mise before atuin, starship and zoxide, and chezmoi runs scripts without the profile.
  • Simpler Windows setup (41cb497, 9071154, 4c5a130, d955571): like on Unix, chezmoi's one-liner installs chezmoi and applies the dotfiles, so the only prerequisites are PowerShell 7 and Git from winget, without --interactive. The README says what they're for: the profile and chezmoi's scripts run in PowerShell 7, and chezmoi, Neovim and yazi use Git. The old install script and its gsudo prerequisite are gone.
  • atuin in PowerShell (b680dfa): Ctrl+r searches history with atuin, like in zsh, and the Up arrow keeps its prefix search. PSReadLine's prediction view stays on its default key, F2.
  • PowerShell profile (7f4d062, 2fe66fb, 0386e75): the profile loads its scripts from its own folder instead of the one $PROFILE names. The two differ when Documents is in OneDrive, since PowerShell then looks for its profile there instead of in ~\Documents, where chezmoi puts it. A one-line profile there that loads chezmoi's, added by hand, made it load the old copies of the scripts in OneDrive. The README gives the command that adds that profile. delta and bat page with Git for Windows' less, which isn't on PATH, so chezmoi diff pages on Windows too.
  • git gets GitHub credentials from gh (e996c3e): git's settings set mise's gh shim as git's credential helper for GitHub on every OS. Before, gh auth login added the path of the gh it ran from to the file chezmoi manages: grm's ~/.local/bin/gh, or with mise's gh, a versioned path that mise upgrade removes. Now gh sees that it's already the helper and leaves git's settings alone. Windows runs gh auth login like Unix. Git Credential Manager, which comes with Git for Windows, still handles other hosts. CI checks that git gets the credentials in PowerShell, and on Windows also in cmd with the Path that a new terminal gets (c882eac).
  • git's settings move to ~/.config/git/config (632093c, cb4658d, ab3a411): Git Credential Manager saves which account to use for an Azure DevOps organization in ~/.gitconfig, and without it asks you to sign in on every fetch and push. chezmoi managed that file, so each apply removed the setting, and GCM's sign-in window kept opening. git reads ~/.config/git/config before ~/.gitconfig on every OS, and git config --global writes to ~/.gitconfig when it exists. chezmoi creates ~/.gitconfig if it's missing, since git config --global writes to ~/.config/git/config otherwise, but doesn't manage it, so what tools save there stays out of the dotfiles. git config --global <key> now reads only ~/.gitconfig, while git config <key> reads both.
  • WSL (bf22132, 7b5c047, 794e199, cf7e008): .zshrc no longer prepends System32 to PATH, and the reference wsl.conf keeps WSL's default of appending the whole Windows PATH. .zshrc keeps only System32, Windows and VS Code's bin from it, for clip.exe, cmd.exe, explorer.exe and code: mise and zsh look through every folder on PATH, and folders in /mnt/c are slow to read from Linux. It keeps System32 and Windows whatever their case, since some PCs have C:\WINDOWS. .zshrc is a plain file again.
  • System setup (d96c7de, 00139d0, dff8e36): the packages script installs only the missing apt packages, so it uses sudo only when needed and no longer runs on every apply. It no longer adds a duplicate /etc/shells line either. Fedora support and the FiraCode font install are gone.
  • Desktop apps (47c0460, 6a003c2, bdf8158, 5d8f7a3, fc94907, d8a8c73, c7f6fdc, 9cf7ca8): on macOS and Windows, chezmoi init asks "Install the desktop apps", and the default is yes. .chezmoidata/desktop-apps.toml lists them once for both: Bitwarden, Docker Desktop, Microsoft To Do, Nextcloud, Speedtest, TorGuard, VS Code, WireGuard and WizTree, plus Ghostty on macOS, and Outlook and UniGetUI on Windows. Windows installs them with winget, skipping the ones already installed. macOS installs Homebrew if it's missing, then the apps with brew bundle: casks, App Store apps with mas, which needs an App Store sign-in, and WizTree from Antibody Software's tap, which the Brewfile trusts, as Homebrew 6 and later require. Bitwarden comes from the App Store on macOS, since its Safari extension only comes with that app. .zshrc loads Homebrew's environment on Apple silicon. The tools scripts are renamed to install-cli-tools to tell them apart.
  • software.md replaces the UniGetUI bundles (8251a1a, 5d8f7a3, 6a09ac2, 9cf7ca8, cc2c705): reference_dotfiles/software.md lists the other software, with winget IDs, and Homebrew casks for Discord, Plex, Signal and TeamViewer, which also run on macOS and Linux. It lists what only runs on Windows separately, and links mise's config and the desktop apps list for what the dotfiles install. NanaZip replaces 7-Zip, and Outlook, which the desktop apps now install on Windows, replaces Thunderbird. OpenVPN Connect, Slack, Zoom, Second Screen, LLVM, the Logitech apps and Plantronics Hub are gone, as is everything the dotfiles or their prerequisites install.
  • Neovim works the first time it opens (91da897, 44e3f21, f971838, dc458e6, 5c91818):
    • gcc builds nvim-treesitter's parsers. The old Windows script's choco mingw was the only one there, and LazyVim on Windows doesn't use LLVM's clang. The Linux packages script installs gcc when cc is missing, and a new Windows packages script installs WinLibs, the gcc build LazyVim recommends.
    • Mason installs pyrefly in a Python virtual environment, so the Linux packages script installs python3-venv when ensurepip is missing, and the Windows one installs Python when only the Microsoft Store stub is there. Linux also gets unzip, which Mason unpacks stylua with.
    • mise installs the tree-sitter CLI that nvim-treesitter builds the parsers with. It's conda-forge's build, because the official builds of 0.26.1 and later, the versions nvim-treesitter supports, need glibc 2.39, so they don't run on Ubuntu 22.04. The mise config says to switch it to the official build, and atuin and yazi from their musl builds to their glibc builds, once the dotfiles drop 22.04 (9a3a9cc, fd67700).
    • lazy.lua creates Neovim's site folder before lazy.nvim starts. On the first start the folder didn't exist, so Neovim and lazy.nvim left it off the runtimepath, and the parsers built in it didn't load until a restart (folke/lazy.nvim#2153).
  • A prompt replaces the no-encryption branch (c361dfc, cbc06e2): chezmoi init asks "Decrypt the encrypted files with the key passphrase". Answering no skips the encrypted SSH config and the decrypt scripts. The work setup stays on the work branch.
  • Built-in age (d2604af, 41cb497, c9fee53): the decrypt scripts use chezmoi age decrypt, and chezmoi always uses its built-in age, even where the age command is installed, so no OS needs it. A wrong passphrase stops the apply. The decrypt scripts are empty once the key exists, so chezmoi status no longer lists one on every machine that decrypts (9eaeac6).
  • Fewer templates (3f3e442): the Windows packages script had no template actions, so it's a plain file. The decrypt scripts get chezmoi's paths from the environment variables chezmoi gives scripts, and are templates only to skip themselves once the key exists (9eaeac6).
  • Faster zsh (87aa326, a4a153d, 7b5c047): skips Ubuntu's global compinit and caches the completion dump, so the completion setup takes about 14 ms instead of 650 ms. zsh locks its history file with fcntl: its default lock file changed ~ after every command, so mise's prompt hook redid its work at every prompt. On my WSL machine, a new shell takes 0.16 s instead of 2.3 s on main, and a prompt 49 ms instead of 84 ms.
  • fzf (bf32346): sources fzf --zsh instead of a vendored copy of fzf 0.73's key bindings, keeping the file widget on Ctrl-F.
  • Cleanup (79d7d96, b65e399, d3512fe, c7037ee, bc93723, a8c05d8, 7a15889): removes the bpytop, tmuxinator, openvpn3, hatch, Alacritty, komorebi and whkd configs, the Copilot CLI, the profile's commented-out code, and its Import-Module PSReadLine, which did nothing because PowerShell 7 loads the PSReadLine it comes with.
  • README for all of the above (27de067). Every OS takes the same installation steps, with what differs under each step, and the highlights are short again (1cc1368, fb64495). It says Ubuntu 22.04 or later, including WSL 2, rather than Linux, since that's what CI tests (ff0a240). It says Apple silicon Macs and x64 Windows, which mise.lock has the tools for (ba8a79d), and to run chezmoi init --apply when chezmoi says that its config template changed (2fa2a3d).
  • CI (c4e693f and later commits):
    • lints every rendered template for each OS, answering yes and then no to the prompts, and the files that aren't templates;
    • installs the dotfiles on fresh Ubuntu (latest, now 26.04, and 22.04 in a container), macOS and Windows machines, then checks that a second apply changes nothing, that the shells start cleanly with the tools from mise, that git gets GitHub credentials through mise's gh, and on Windows that what git config --global saves stays out of the dotfiles;
    • opens a Python file in a headless Neovim with check-nvim.lua, and fails unless lazy.nvim installed every plugin, Mason every tool and language server, and nvim-treesitter every parser, the parsers load, and the pyrefly and ruff language servers start (421dabd). It takes about 20 seconds on Ubuntu, 70 on macOS and 100 on Windows.

Closes #4: chezmoi's scripts replace the Windows install script. They only install what's missing. You upgrade the tools with mise, and everything else with winget or UniGetUI. What they install with winget comes from its default sources, so there are no sources to add.
Closes #5: mise's config and lockfile are the declarative package management the nix branch was exploring.

Testing

  • CI passes on all four machines, including the Neovim check: https://github.com/patrick-5546/dotfiles/actions/runs/43333740226
  • On a real machine: applied over the old setup on my Ubuntu 26.04 machine in WSL 2. The Neovim check passes, chezmoi status only lists the lazy-lock.json that lazy.nvim updated, and git push authenticates through mise's gh. With my config, a new zsh takes 0.16 s (2.27 s on main, 1.24 s before a4a153d and 7b5c047), each prompt 49 ms (84 ms, 508 ms), each cd 114 ms (73 ms, 555 ms), and chezmoi status 0.11 s (0.93 s). At the end, with the full Windows PATH that a new terminal gets, every feature still worked, and the migration command below emptied ~/.gitconfig without changing git's settings.
  • PowerShell on my Windows machine, which has this branch applied and Documents in OneDrive, with a one-line profile there that loads chezmoi's: the profile loads its scripts from ~\Documents\PowerShell, not the old copies in OneDrive, and delta and bat start Git's less. All the tools come from mise, Ctrl+r opens atuin, git gets GitHub credentials from gh in PowerShell and in cmd, and the Neovim check passes. After the migration command below, ~/.gitconfig kept only GCM's Azure DevOps account, and chezmoi status stayed empty. The profile takes about 1.3 s to load, so PowerShell says how long it took: mise's activation takes 0.55 s, starship's 0.25 s and atuin's 0.2 s. Each cd takes about 0.3 s, mostly mise updating the environment for the new folder.
  • Release age: with the 7-day setting, mise upgrade --dry-run holds back atuin 18.24.6, released the day before, and changes nothing else. mise install --locked installs the locked versions as before, and an automatic update never installs a mise older than the running one.
  • Neovim check in Docker: passes in fresh Ubuntu 24.04 and 22.04 containers. It found the first-start parser bug, and without python3-venv it fails with Mason didn't install pyrefly: … ensurepip is not available.
  • tree-sitter 0.25.9: its official build built and loaded all the parsers in Ubuntu 22.04, but :checkhealth reports an error, because nvim-treesitter requires 0.26.1 or later. So the dotfiles keep conda-forge's build.
  • Shared desktop apps list: before the new apps, the rendered Brewfile was the same as the old one, and Homebrew 7.0.13, the latest, parses the final one in its Docker image. With a fake winget, the Windows script passes each app's ID and source, and names the apps that failed.
  • Windows packages and desktop apps scripts: with a fake winget in pwsh on Linux, they install only what's missing, treat "already installed" as success, and fail on errors. The packages script installs Python when python is the Microsoft Store stub, and the apps script installs the other apps when one fails, then fails so that the next apply retries.
  • Docker: ran the CI test in fresh Ubuntu 26.04 and 24.04 containers as a sudo user, and in 22.04 as root like the CI container. A 26.04 run with a world-writable /usr/share, like GitHub's image, reproduced the compinit prompt that CI hit, and the test now fixes it. A bare 22.04 container has no cc, and installing gcc provides it with the C headers.
  • Lockfile round trip: mise use -g fd@10.4.2 changed only fd's line in the config, kept its comments, and updated fd for all four platforms in the lock. chezmoi re-add ~/.config/mise saved both files, and chezmoi status was empty afterwards. Reverting a lock change reruns the install script.
  • atuin in PowerShell: with pwsh 7.7 on Linux, the profile's PSReadLine setup and atuin's init start silently. The new test.ps1 checks pass, and fail when atuin's init is missing or the Up arrow is bound to atuin.
  • Decryption: run by chezmoi apply with a test key, the decrypt scripts ask for the passphrase once and write a key identical to the original, 0600 on Unix, and the next apply does nothing. A wrong passphrase fails the apply without leaving a key. The PowerShell script ran under pwsh on Linux.

The sandbox couldn't download go, so the Docker runs skipped it; CI installs it. macOS ran only in CI, not on a real machine. CI answers no to the desktop apps prompt, and the Windows runner already has gcc and Python, so it doesn't run those installs. The Homebrew casks and App Store IDs were checked against homebrew-cask and other Brewfiles, and WizTree's cask and trusted: true against its tap and Homebrew's source, not installed.

Migrating existing machines

The templates read the answers to the new prompts, so run chezmoi init after pulling and before applying. Otherwise chezmoi update pulls, then fails with map has no entry for key "encryption", or "apps" if you applied this branch before 6a003c2. On every OS:

chezmoi git pull
chezmoi init --apply  # decrypt: yes. On macOS and Windows, also choose whether to install the desktop apps

On WSL, also delete appendWindowsPath = false from /etc/wsl.conf and run wsl --shutdown. .zshrc no longer adds System32 to PATH. It keeps System32, Windows and VS Code's bin from the Windows PATH that WSL appends, so otherwise cmd.exe, clip.exe and code disappear. Then, if tmux is running, run tmux set-environment -gu __MISE_ORIG_PATH, or restart tmux, and open new terminals and tmux windows: shells started before the new .zshrc pass the whole Windows PATH down to new ones in mise's __MISE_ORIG_PATH, which mise rebuilds PATH from.

chezmoi no longer manages ~/.gitconfig, so after applying, remove the dotfiles' settings from it, which are in ~/.config/git/config now. This keeps what tools like Git Credential Manager saved there, and removes the credential helper that gh auth login added before e996c3e:

git config --file ~/.config/git/config --list --name-only | sed 's/\.[^.]*$//' | sort -u |
    while read -r s; do git config --file ~/.gitconfig --remove-section "$s" 2>/dev/null; done

In PowerShell:

git config --file "$HOME\.config\git\config" --list --name-only | ForEach-Object { $_ -replace '\.[^.]*$' } |
    Sort-Object -Unique | ForEach-Object { git config --file "$HOME\.gitconfig" --remove-section $_ 2>$null }

It removes whole sections, so if you added a setting by hand to one that the dotfiles set, like user.signingKey, add it back with git config --global. On Windows, the next apply asks you to log in with gh auth login.

On macOS, brew bundle adopts the desktop apps you installed without Homebrew if they update themselves, like VS Code, or match the cask's version. Otherwise it fails with It seems the existing App is different from the one being installed: delete the app and apply again.

Bitwarden now comes from the App Store on macOS. If yours came from the cask or Bitwarden's website, remove it before applying (brew uninstall --cask bitwarden, or move it to the Trash), so the App Store app can replace it. Then turn the extension on in Safari's settings.

After merging

  • Delete the no-encryption branch: git push origin --delete no-encryption. The nix branch is already deleted.
  • Optionally delete the binaries grm installed in ~/.local/bin: atuin bat delta dust fd fzf gh grm lazygit lsd rg starship uv uvx ya yazi zoxide. mise's copies already come first on PATH, and git no longer uses grm's gh (e996c3e).
  • On Windows, if Documents is in OneDrive, optionally delete the old aliases.ps1, functions.ps1 and ssh.autocomplete.ps1 in its PowerShell folder, which the profile loaded before 7f4d062.
  • Delete the files chezmoi no longer manages: ~/.config/grm, ~/.nvm, ~/.local/share/zsh-nvm, ~/.config/fzf/key-bindings.zsh, ~/.config/bpytop, ~/.config/tmuxinator, ~/.config/hatch, ~/.config/zsh/openvpn3.zsh and ~/.alacritty.toml, and on Windows ~/.config/komorebi and ~/.config/whkdrc.
  • npm globals installed under nvm don't carry over. Reinstall them with mise's npm, or add them to the mise config as "npm:<package>" = "latest".
  • On Windows, optionally uninstall the winget copies of delta, fd, fzf, lazygit, Neovim, ripgrep, starship and zoxide. mise's copies come first in PowerShell, but they're only on PATH there, so keep the winget ones if you use the tools from other shells.
  • On Windows, optionally uninstall komorebi, whkd and age, which nothing uses now, and run atuin import powershell once to add your PowerShell history to atuin.
  • On Windows, optionally uninstall the PowerShell modules the old install script installed, which nothing imports now: Uninstall-Module posh-git, git-aliases, Terminal-Icons.

patrick-5546 and others added 9 commits November 10, 2026 09:10
The vendored key-bindings.zsh was the `fzf --zsh` output of fzf 0.73 with
the file widget moved from Ctrl-T to Ctrl-F, so it drifted from the
installed fzf on every upgrade. Source `fzf --zsh` instead and rebind
afterwards: the file widget goes on Ctrl-F and Ctrl-T gets its default zsh
binding back in each keymap. This also loads fzf's ** completion, which the
existing _fzf_compgen_path and _fzf_compgen_dir functions are for.

fzf has to be on PATH when .zshrc sources it, so the block moves below the
PATH exports. The install script no longer appends `fzf --zsh` to a _fzf
"completion" file on every run, and removes the old file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
run_install-unix.sh ran on every apply and mixed user-level installs with
system changes. Move the parts that need root into
run_onchange_before_install-packages-unix.sh, which chezmoi runs before
applying files and again only when the rendered script changes.

- Install only the missing commands with apt or dnf, so sudo is only used
  when something is missing. The Fedora block no longer runs
  `dnf -y update`, and no longer renders to a syntax error: its last
  package line ended in a backslash, and `{{- end -}}` joined the font
  check onto it.
- Install zsh, git and curl instead of exiting when zsh is missing. git is
  needed for the git-repo externals, which are applied after this script.
- Ask dnf for /usr/bin/chsh, because newer Fedora releases moved chsh from
  util-linux-user to util-linux.
- Download the font with curl -f into a temporary directory, so a failed
  download doesn't leave an empty font directory that skips the install.
- Compare the login shell from the user database instead of $SHELL, use
  the zsh path the package registered, and only add it to /etc/shells when
  it is missing. Previously every run appended a duplicate line.
- Treat a failed chsh as a warning, as before, but with set -euo pipefail
  for the rest of the script.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
run_install-unix.sh reinstalled chezmoi and every grm tool on each
`chezmoi apply`, calling the GitHub API without a token about 15 times per
run, which is a quarter of the unauthenticated hourly limit.

Install the tools with mise (https://mise.jdx.dev) instead. They're listed
in ~/.config/mise/config.toml, and `mise upgrade` updates them. mise's
registry knows each project's release assets, so the grm asset filters go
away, and its aqua backend verifies the checksums and signatures projects
publish. mise can also manage node and go, which a later commit uses.

run_onchange_after_install-tools-unix.sh installs mise if needed, runs
`mise install` and generates the completions. It embeds a hash of the mise
config, so chezmoi runs it again only when the script or the tool list
changes. Update chezmoi with `chezmoi upgrade` instead of reinstalling it.

- atuin and yazi use their static musl builds, because their glibc builds
  need glibc 2.39. The other tools run on Ubuntu 22.04's glibc 2.35, and
  lsd keeps its glibc build, which shows user names instead of uids.
- nvim and tmux come from mise, so they're no longer prerequisites.
- Write completions with > instead of >>, so the files don't grow on every
  run, and remove the old _grm. Copy the completions that lsd, yazi and
  zoxide ship in their archives, generate fd's, and download dust's from
  the installed version's tag instead of master.
- delta's completion didn't work because zsh's own _sccs completion also
  claims `delta` (the SCCS command). Map it with compdef instead of
  sourcing the file. bat's completion works now that the file isn't
  duplicated.
- Only run `gh auth login` from a terminal, and warn instead of failing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Install node (the latest LTS) and go with mise, replacing zsh-nvm and the
manually installed /usr/local/go. zsh-nvm's lazy loading wrapped nvim,
lazygit, copilot and make in functions that loaded nvm on first use,
while mise puts node on PATH directly.

Node.js 26 links against libatomic, which minimal Ubuntu and Fedora
installs don't have, so the packages script installs it when missing.

Install the Copilot CLI as its standalone binary with mise instead of as an
npm global, which nvm tied to a single node version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The work and no-encryption branches were copies of main with a few
changes, so they had to be kept in sync by hand: work is 31 commits behind
main and no-encryption 101. chezmoi init now asks two questions instead,
and the templates handle the differences.

"Is this a work machine" (default no) uses the work email and lazygit
branch prefix, copies from tmux with xclip, gives starship a longer command
timeout, sources ~/.zshrc.$USER and manages ~/.bashrc. mise lives in ~/bin,
as the work tools did, and ~/.local/bin stays off PATH. Go isn't installed,
and the Alacritty, Hatch and IdeaVim configs are skipped. The rendered
files match the work branch's.

"Decrypt the encrypted files with the key passphrase" (default yes) isn't
asked on work machines, which skipped the encrypted files already. With no,
the decrypt script, SSH config and OpenVPN functions are ignored instead of
deleted from a branch.

The work bashrc runs `fzf --bash` instead of a copy of fzf's
key-bindings.bash, still without the file widget, and only loads pixi
completions if pixi is installed. Starship can be disabled with
STARSHIP_DISABLE=true on every machine.

Existing machines need `chezmoi init` to answer the prompts. Until then,
templates fail with "map has no entry for key work".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Decrypt ~/.chezmoikey.txt with `chezmoi age decrypt --passphrase`, the
pattern from the chezmoi encryption FAQ, so the age binary is no longer
a prerequisite. chezmoi already falls back to its built-in age for the
encrypted files when age isn't on PATH.

Run the Unix script with `set -eu` and exit the Windows script when
decryption fails, so a wrong passphrase stops the apply right away
instead of failing later on the missing identity. Quote the Test-Path
path on Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Neither bpytop nor tmuxinator is installed by any script, and the
tmuxinator sessions point at old course projects. Remove their configs,
the commented-out btop alias, and the .chezmoiignore entries for them
and for install-windows.ps1, which only exists under reference_dotfiles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Describe the mise config and the two install scripts, the work and
encryption prompts, and how to keep everything up to date. curl is now
the only prerequisite on Linux, since the packages script installs git
and zsh and chezmoi decrypts with its built-in age. Install chezmoi with
an explicit -b so the command works from any directory.

Remove the no-encryption branch, tmuxinator, the neovim PPA and the OS
version numbers, and link to UniGetUI, the new name of WingetUI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a CI workflow with two jobs:

- lint renders every template for Ubuntu, Fedora, WSL, macOS and Windows,
  each as a personal machine with and without encryption and as a work
  machine. It then checks the results with shellcheck, zsh -n, the
  PowerShell parser, and TOML, YAML and git config parsers.
- apply installs the dotfiles from the checkout the way the README does, on
  fresh Ubuntu (personal and work), Fedora and macOS machines. It checks that
  applying again changes nothing and that zsh is the login shell. It also
  checks that zsh, and bash on work machines, start without output and have
  the tools from mise, their completions, and the fzf and atuin key bindings.

Both scripts live in .github so they can run outside CI. test.sh refuses to
run unless CI=true, because it replaces the dotfiles in $HOME.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread dot_config/mise/config.toml.tmpl Resolved
Comment thread dot_config/mise/config.toml.tmpl Resolved
Comment thread dot_config/mise/config.toml.tmpl Resolved
Comment thread dot_config/mise/config.toml.tmpl Resolved
Comment thread dot_config/mise/config.toml.tmpl Resolved
Comment thread .github/lint.sh Resolved
Comment thread .github/lint.sh Resolved
Comment thread .chezmoiignore Resolved
Comment thread dot_zshrc.tmpl Resolved
Comment thread dot_config/mise/config.toml.tmpl Resolved
patrick-5546 and others added 10 commits November 10, 2026 18:43
Drop the work machine prompt and everything that depended on it, so main
only has my personal setup. lazygit, starship and tmux go back to the plain
files main had, along with main's gitconfig. The encryption prompt stays and
is now always asked.

mise and the tools it installs, including go, are the same on every
machine, and mise lives in ~/.local/bin like chezmoi.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
I don't use Fedora anymore. The packages script only uses apt now, and CI
tests Ubuntu 22.04 in a container instead of Fedora, which covers an
older glibc and a machine without the runner's preinstalled packages.

No template reads the OS release anymore, so lint.sh only sets the kernel
release, which is how the templates tell WSL apart from other Linux.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The dotfiles no longer install the FiraCode Nerd Font, so the packages
script no longer needs fontconfig and unzip either. Terminal configs still
choose the font; install it separately where it's wanted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
I don't use either anymore. With openvpn3 gone, the SSH config is the only
encrypted file the dotfiles apply.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The config had no template logic left, and chezmoi re-add skips templates.
As a plain file, a tool added or changed with `mise use -g` (which keeps
comments and inline options like libc) can be saved back to the source
with `chezmoi re-add ~/.config/mise`.

The header now explains where mise installs tools, how they get on PATH,
and how to add, update and run tools and update mise itself. lint.sh now
checks the syntax of TOML files that aren't templates too.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ubuntu's /etc/zsh/zshrc runs compinit before ~/.zshrc runs it again with
the dotfiles' completions in fpath. The two runs kept replacing each
other's ~/.zcompdump, so both rebuilt it in every new shell, which is why
caching never worked. ~/.zshenv now sets skip_global_compinit=1, which
Ubuntu documents for this.

~/.zshrc now runs the full compinit, with its search for new completions
and its security check, only when the dump is missing or a day old, and
loads the dump as is with compinit -C otherwise. The tools script deletes
the dump after it updates the completions so the next shell picks them up.

In a clean Ubuntu 24.04 container this cuts the time to start zsh with
the completion setup from about 650 ms to 14 ms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Windows and Unix now share dot_config/mise/config.toml:

- run_onchange_after_install-tools-windows.ps1 installs mise in
  ~\.local\bin with its PowerShell installer, then the tools. Like the
  Unix script, it reruns when the mise config changes.
- The PowerShell profile activates mise before starship and zoxide,
  which mise now installs.
- Windows skips atuin, since only zsh uses it. mise already skips tmux
  there.
- chezmoi runs scripts without the profile, so the first apply doesn't
  print errors for tools that aren't installed yet.
- The reference install script and the UniGetUI bundle no longer
  install the tools that mise manages.
- CI applies the dotfiles on Windows too, and lint parses the
  PowerShell files that aren't templates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mise.lock records the version, URL and checksum of each tool for Linux
(x64 and arm64), Apple silicon Macs and Windows, so every machine
installs the same builds and `chezmoi update` carries upgrades to the
others. The install scripts use `mise install --locked` and rerun when
the lock changes.

To upgrade, run `mise upgrade`, `chezmoi re-add ~/.config/mise` and
commit. To roll back, revert that commit. atuin and uv record GitHub
attestations. gh's entry has none because the sandbox that generated the
lock couldn't download its attestation bundle; it gets one when gh is
next upgraded.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a command in the pseudo-terminal waited for input, the alarm killed
the test with status 142 and lost everything the command had printed, so
the log didn't show what it was waiting for. Now the test stops the
command after 2 minutes, prints its output with "(timed out)", and fails
with status 124. The zsh checks report the status and output together.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitHub's Ubuntu image runs `chmod -R 777 /usr/share`, which leaves
/usr/share/zsh and /usr/share/zsh/vendor-completions writable by
everyone. When zsh starts, compinit's security check asks whether to use
these insecure directories, and the test timed out waiting for an
answer. The test now removes that write access from the directories
compaudit reports, as you would on your own machine, and leaves the
dotfiles' compinit as is.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@patrick-5546 patrick-5546 changed the title Install tools with mise, replace the work and no-encryption branches with prompts, and add CI Install tools with mise on every OS, replace the no-encryption branch with a prompt, and add CI Nov 10, 2026
Comment thread dot_zshrc.tmpl Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread dot_config/mise/config.toml Resolved
patrick-5546 and others added 7 commits November 10, 2026 22:05
I don't use it anymore. After updating, `mise prune` deletes its install.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
I don't use Alacritty anymore. chezmoi doesn't delete files it stops managing,
so delete ~/.alacritty.toml by hand.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The zshrc prepended System32 because the reference wsl.conf turned off
appendWindowsPath. Prepending made zsh search a slow Windows folder before the
Linux ones, and System32 doesn't have VS Code's `code`. Use WSL's default
instead, which appends the whole Windows PATH, including `code`.

.zshrc no longer has template code, so make it a plain file, and stop linting
WSL separately since no template tells it apart from Linux anymore.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Install PowerShell 7 and Git with winget first. Microsoft recommends winget
for PowerShell, and its installers' defaults are fine because .gitconfig sets
the editor and line endings, so --interactive isn't needed. Git has to be on
PATH because chezmoi clones the yazi theme with it.

Then chezmoi's PowerShell one-liner installs it in ~\.local\bin and applies the
dotfiles, so chezmoi doesn't need to be installed first, and `chezmoi upgrade`
updates it. Remove chezmoi from the UniGetUI bundle, and age too: chezmoi
decrypts with its built-in age.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
It was already unused: UniGetUI and its bundles in reference_dotfiles/wingetui
replaced it, and it installed Chocolatey packages and PowerShell modules the
profile no longer imports. Point the README at the bundles instead, and drop
its gsudo prerequisite.

Closes #4

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The timing wrapper, the posh-git, git-aliases and Terminal-Icons imports, and
the old zoxide setup were all commented out. zoxide is set up at the end.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
I don't use the komorebi tiling window manager or its whkd hotkeys anymore.
Remove their configs and the kstart/kstop aliases. chezmoi doesn't delete
files it stops managing, so delete ~/.config/komorebi and ~/.config/whkdrc by
hand.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@patrick-5546 patrick-5546 changed the title Install tools with mise on every OS, replace the no-encryption branch with a prompt, and add CI Install CLI tools with mise and desktop apps with Homebrew and winget, replace the no-encryption branch with a prompt, and add CI Nov 11, 2026
patrick-5546 and others added 6 commits November 12, 2026 01:52
… work

By default, zsh locks the history file by creating and deleting
~/.zsh_history.LOCK after every command. That changes ~'s modification
time, and mise's prompt hook takes a changed folder on its config search
path as a sign that a config file might have appeared, so it rebuilt
PATH and the environment at every prompt instead of taking its fast
path. hist_fcntl_lock locks the history file itself instead.

On my WSL machine, the hook went from about 36 ms to 5 ms per prompt,
and from 550 ms to 6 ms with WSL's Windows PATH.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
WSL appends the whole Windows PATH, 42 folders on my machine, and
folders in /mnt/c are slow to read from Linux. mise checks every folder
on PATH when it activates and at each cd, and zsh searches them for
each command it doesn't know, which syntax highlighting does as you
type. So a new shell took 1.2 s, each cd 0.5 s, and each lookup of a
missing command 127 ms.

.zshrc now keeps only System32 and Windows, for clip.exe, cmd.exe,
explorer.exe and wsl.exe, and VS Code's bin folder, for code. A new
shell takes 0.16 s, a cd 0.11 s, a missing command 10 ms, and chezmoi
status 0.11 s instead of 0.93 s. test.sh checks which folders it keeps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
gh auth login added itself to ~/.gitconfig, which chezmoi manages, as
git's credential helper for GitHub, with the path of the gh it ran
from. On my machine, that was grm's ~/.local/bin/gh, which the PR says
to delete, and mise's would be a versioned path that mise upgrade
removes.

.gitconfig now sets the helper to mise's gh shim on every OS. gh
recognizes itself as the helper, so gh auth login no longer offers to
set up git or changes the file. Windows used Git Credential Manager, and
its tools script now runs gh auth login too, like the Unix one, unless
chezmoi's input isn't the terminal.

test.sh and test.ps1 check that git gets GitHub credentials through the
shim, using the GITHUB_TOKEN that CI sets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
minimum_release_age = "7d" makes mise skip tool and mise releases from
the last 7 days, instead of its default 24 hours, which gives others
time to find a compromised or broken release. It applies to mise
upgrade, use and lock, and to mise's own updates, but not to the
versions already in mise.lock, so nothing is downgraded. The tools
script gives mise's installer the same age, since it doesn't read the
config.

self_update.auto updates mise once a week, before a command that may
download something, except in CI and scripts. Every machine reads the
same mise.lock, so this keeps their mise versions close. An automatic
update never installs a release older than the running one.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chezmoi runs run_before_ scripts on every apply, so chezmoi status
always listed decrypt-private-key-unix.sh on the machines that decrypt.
CI answers no to the decrypt prompt, so its check that chezmoi status
is empty didn't see it.

The scripts are templates again, and they're empty once
~/.chezmoikey.txt exists. chezmoi skips empty scripts, and still runs
them if the key is deleted. lint.sh renders them for home folders
without a key.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chezmoi used the age command where it's installed, as on my Ubuntu
machine, and its built-in age everywhere else. The decrypt scripts
already use the built-in one, so now chezmoi always does, and no
machine needs the age command. chezmoi init applies it to existing
machines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread dot_zshrc Resolved
Comment thread dot_config/git/config.tmpl Resolved
patrick-5546 and others added 13 commits November 12, 2026 19:08
The Windows tools script installs mise with mise's PowerShell installer,
which, like the Unix one, reads MISE_MINIMUM_RELEASE_AGE, even though
mise's docs don't list it for that script. So the first install picked
any release older than the installer's default of 24 hours, while the
mise config holds back mise's own updates for 7 days. Give it the
config's value, as the Unix tools script does.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
.zshrc keeps System32, Windows and VS Code's bin folder from the Windows
PATH that WSL appends. With appendWindowsPath = false in /etc/wsl.conf,
WSL appends nothing, so clip.exe, explorer.exe and code are missing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cmd, Windows PowerShell and VS Code don't activate mise, so git only
finds gh through the absolute path of mise's shim in .gitconfig. Run git
credential fill from cmd with the Path that a new terminal gets, from
the registry, as well as from the test's PowerShell.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ghostty is a terminal emulator, and its Homebrew cask needs macOS 13 or
later. It has no Windows version, so the desktop apps list only gives
its cask. The Windows script renders the same as before, so it doesn't
run again.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
winget's default source has the new Outlook for Windows as
Microsoft.Outlook.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The new Outlook for Windows moves from software.md, which lists what
the dotfiles don't install, to the desktop apps, which install it with
winget's Microsoft.Outlook. It's only for Windows, so macOS's script
renders the same as before and doesn't run again.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The profile dot-sourced functions.ps1, ssh.autocomplete.ps1 and
aliases.ps1 from $profile's folder, which is where PowerShell looks for
the profile. With Documents in OneDrive, that's OneDrive's Documents, so
a profile there has to load chezmoi's from ~\Documents\PowerShell, and
chezmoi's then loaded the old copies of the three scripts left in
OneDrive. $PSScriptRoot is the folder of the running file, and the same
as $profile's when PowerShell loads chezmoi's profile itself.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chezmoi diff and bat printed without paging on Windows: both look for
less on PATH, and Git's less is in C:\Program Files\Git\usr\bin, which
isn't on it. git diff paged, because Git puts that folder on PATH for
the programs it starts. PowerShell's less alias doesn't reach them.

The profile sets DELTA_PAGER and BAT_PAGER to Git's less, without
arguments: given any, delta and bat pass only those, so delta would
skip --quit-if-one-screen and wait for q after even a short diff. delta
splits BAT_PAGER's path at the space, so BAT_PAGER alone isn't enough.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PowerShell looks for its profile in the Documents folder, and OneDrive
can move that folder into OneDrive. chezmoi still puts the profile in
~\Documents\PowerShell, so PowerShell didn't load it.

A new Windows script writes a profile in the Documents folder that
PowerShell uses, which loads chezmoi's, if that folder isn't
~\Documents. It leaves a profile that has other commands as it is, and
says what line to add to it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eDrive"

This reverts commit d4cdd5c. Where Documents is in OneDrive, a profile
there with the one line that loads chezmoi's, added by hand, is enough.
chezmoi doesn't manage that file, so it leaves it alone, and the profile
loads its scripts from its own folder since 7f4d062.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Git Credential Manager saves which account to use for an Azure DevOps
organization in ~/.gitconfig, with git config --global, and asks you to
sign in again on every fetch and push without it. chezmoi managed that
file, so each apply removed the setting, and GCM kept opening its
sign-in window until you signed in again.

The dotfiles' settings move to ~/.config/git/config, which git reads
before ~/.gitconfig on every OS. chezmoi creates ~/.gitconfig if it's
missing but doesn't manage it, and git config --global writes there
when it exists, so tools' settings stay out of the dotfiles. CI checks
that such a write leaves chezmoi status empty.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PowerShell then looks for its profile in OneDrive instead of in
~\Documents, where chezmoi puts it. The README gives the command that
adds a profile there which loads chezmoi's.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chezmoi removes a file that's empty unless its source name has empty_,
even one that it only creates. Removing the dotfiles' settings from an
existing ~/.gitconfig, now that they're in ~/.config/git/config, can
leave it empty, and the next apply would delete it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread create_empty_dot_gitconfig Resolved
patrick-5546 and others added 3 commits November 12, 2026 23:46
Some PCs have Windows in C:\WINDOWS, so WSL appends /mnt/c/WINDOWS and
/mnt/c/WINDOWS/system32 to PATH. .zshrc only kept the folders spelled
Windows, so it removed those, and cmd.exe, clip.exe and explorer.exe
with them. It now matches them in any case, and CI checks both
spellings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mise.lock has the tools for Apple silicon Macs and x64 Windows PCs,
but not for Intel Macs or Windows on Arm, where mise install --locked
fails.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the config template asks a new question, chezmoi update pulls,
then fails, since the templates read the answer that isn't saved yet.
chezmoi warns that the template changed, and chezmoi init asks only
the new questions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread README.md Resolved
patrick-5546 and others added 2 commits November 13, 2026 00:01
git config --global writes to ~/.gitconfig only if it exists. Without
it, git writes to ~/.config/git/config, the dotfiles' file, so what Git
Credential Manager saves would end up there, and the next apply would
remove it. The comment in the file says so now.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Discord, Plex, Signal and TeamViewer also run on macOS and Linux.
software.md lists them apart from the software that only runs on
Windows, with their Homebrew casks, and says how to install it on each
OS. The READMEs no longer say that the list is for Windows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@patrick-5546
patrick-5546 merged commit 5247b4e into main Nov 13, 2026
5 checks passed
@patrick-5546
patrick-5546 deleted the infra-improvements branch November 13, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop using nix-env Revamp windows installation script

1 participant